package com.chenyaowei.happyhub.pojo.GoodsPojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * id:商品id; 主键
 * header:商品名称; 唯一
 * description:商品描述;
 * meta:商品价格;
 * image:商品首页图片;
 * ad:商品是否在首页广告出现——》默认为false
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Good {
    @ExcelProperty("id")
    private int id;
    @ExcelProperty("名称")
    private String header;
    @ExcelProperty("描述")
    private String description;
    @ExcelProperty("价格")
    private float meta;
    @ExcelProperty("封面图片")
    private String image;
    @ExcelProperty("类型")
    private String type;
    @ExcelIgnore
    private boolean ad;
    @ExcelIgnore
    private boolean slideAd;
    @ExcelIgnore
    private boolean typeAd;
    @ExcelProperty("销量")
    private int salesVolume;
    @ExcelProperty("总销售价")
    private float salesPrice;

    public Good(int id, String header, String description, float meta, String type, int salesVolume, float salesPrice) {
        this.id = id;
        this.header = header;
        this.description = description;
        this.meta = meta;
        this.type = type;
        this.salesVolume = salesVolume;
        this.salesPrice = salesPrice;
    }
}
